package bean;

import java.io.Serializable;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;
@Entity
@Table(name="nacionales")
@PrimaryKeyJoinColumn(name="idArticulo")
public class Nacional extends Articulo  implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -4017039594092449115L;
	@ManyToMany(cascade=CascadeType.ALL)
	@JoinTable(name="nacionalFabricantes", joinColumns={@JoinColumn(name="idArticulo")}, inverseJoinColumns={@JoinColumn(name="codFabricante")})
	private List<Fabricante> fabricantes;

	public List<Fabricante> getFabricantes() {
		return fabricantes;
	}

	public void setFabricantes(List<Fabricante> fabricantes) {
		this.fabricantes = fabricantes;
	}
}
